package noppes.vc.items;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

class ItemSlingshot$1 implements IItemPropertyGetter {
   // $FF: synthetic field
   final ItemSlingshot this$0;

   ItemSlingshot$1(ItemSlingshot this$0) {
      this.this$0 = this$0;
   }

   @SideOnly(Side.CLIENT)
   public float apply(ItemStack stack, World worldIn, EntityLivingBase entityIn) {
      if (entityIn == null) {
         return 0.0F;
      } else {
         ItemStack itemstack = entityIn.getActiveItemStack();
         return itemstack != null && itemstack.getItem() == this.this$0 ? (float)(stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F;
      }
   }
}
